package com.qzdsoft.erpcloud.service.proj;

import com.qzdsoft.erpcloud.domain.proj.MaterialInfo;
import com.qzdsoft.erpcloud.domain.sys.LoginUser;
import com.qzdsoft.erpcloud.vo.proj.MaterialInfoQueryInfo;
import com.qzdsoft.erpcloud.vo.proj.ProjMaterialBomInfo;
import com.qzdsoft.erpcloud.vo.proj.ProjMaterialInfo;
import com.qzdsoft.vo.LayTableResponse;
import com.qzdsoft.vo.Response;

/**
 * Author:ZhangHao
 * 
 */
public interface MaterialInfoService {
    /**
     * 页面初始化查询分页信息 带分页信息
     * @param page
     * @param limit
     * @return
     */
	LayTableResponse<ProjMaterialInfo> findPage(int page, int limit);
	//根据ID 获取一条记录
	MaterialInfo getById(Integer id);
	//***************************CRUD Author: ZhangHao**********************************//	
	//新增存货事件
	Response<String> addMaterial(MaterialInfo materialInfo, LoginUser loginUser) throws Exception;
	//编辑保存
	Response<String> editMaterial(MaterialInfo materialInfo, LoginUser loginUser);
	//删除存货
	Response<String> delteMaterial(Integer id, LoginUser loginUser);
	//根据id 获取一条视图数据
	ProjMaterialInfo getViewById(Integer id);
	//根据表头查询条件 过滤网格数据
    LayTableResponse<ProjMaterialInfo> findPageByItems(MaterialInfoQueryInfo queries);
    //查询所有生产耗用材料
    LayTableResponse<ProjMaterialBomInfo> selectPageBy(MaterialInfoQueryInfo info);
    //查询存货 所有的 BOM 版本
    LayTableResponse<ProjMaterialBomInfo> selectBomVersionByMaterialId(MaterialInfoQueryInfo info);
}
